import React from 'react'
import ReactDOM from 'react-dom/client'


import { Provider } from 'react-redux'
import store from './store'
import App from './App'

import 'antd/dist/antd.css';//引入的antd样式
import './index.css'

// 引入路由
import { HashRouter, BrowserRouter } from 'react-router-dom'


// 根据环境自动切换路由模式
const Router = process.env.NODE_ENV === 'production' ? BrowserRouter : HashRouter

ReactDOM.createRoot(document.getElementById('root')).render(
  // <React.StrictMode>
  <Provider store={store}>
    <Router>
      <App />
    </Router>
  </Provider>

  // </React.StrictMode>
)
